#include "VSettingScintilla.h"

#include <QColor>
#include <QVariant>
#include <QDebug>
#include <Qsci/qscilexerjson.h>


VSettingScintilla::VSettingScintilla(QWidget *parent) : VScintilla(parent)
{

    this->setLexer(new QsciLexerJSON());
    this->setUtf8(true);

    this->setMarginType(QsciScintilla::SC_MARGIN_NUMBER, QsciScintilla::NumberMargin);
    this->setMarginLineNumbers(QsciScintilla::SC_MARGIN_NUMBER, true);
    this->setMarginWidth(QsciScintilla::SC_MARGIN_NUMBER, 30);
    this->setMarginsFont(QFont("YaHei Consolas Hybrid", 10));

    this->SendScintilla(QsciScintilla::SCI_STYLESETBACK, QsciScintilla::STYLE_LINENUMBER, QColor(0xe4e4e4));
    this->SendScintilla(QsciScintilla::SCI_STYLESETFORE, QsciScintilla::STYLE_LINENUMBER, QColor(Qt::black));
    this->setUtf8(true);

    this->setMarginWidth(QsciScintilla::SC_MARGIN_BACK, 13);

}
